package cn.enilu.flash.bean.entity.lease;

import cn.enilu.flash.bean.entity.BaseEntity;
import lombok.Data;
import org.hibernate.annotations.Table;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.validation.constraints.NotBlank;

@Entity(name="t_leased_premises")
@Table(appliesTo = "t_leased_premises",comment = "租赁")
@Data
@EntityListeners(AuditingEntityListener.class)
public class Premises extends BaseEntity {

    @Column(columnDefinition = "VARCHAR(500) COMMENT '项目名称'")
    @NotBlank(message = "项目名称不能为空")
    private String lpName;

    @Column(columnDefinition = "VARCHAR(200) COMMENT '出租方'")
    @NotBlank(message = "出租方不能为空")
    private String leaseName;

    @Column(columnDefinition = "VARCHAR(200) COMMENT '坐落位置'")
    private String leaseLocation;

    @Column(columnDefinition = "VARCHAR(64) COMMENT '出租面积'")
    private String leaseArea;

    @Column(columnDefinition = "VARCHAR(200) COMMENT '目前用途'")
    private String leaseUseful;

    @Column(columnDefinition = "VARCHAR(32) COMMENT '租金挂牌价，单位：元/平方米/天'")
    private String rentalListingPrice;

    @Column(columnDefinition = "VARCHAR(64) COMMENT '实景图片'")
    private String leaseImg;

    @Column(columnDefinition = "VARCHAR(64) COMMENT '联系电话'")
    private String contactPhone;

    @Column(columnDefinition = "TEXT COMMENT '出租内容'")
    private String leaseContent;

    @Column(columnDefinition = "CHAR(1) COMMENT '状态，0下架，1上架'")
    private String state;
}
